<!doctype html>
<html lang="en">
<head>
    <title>Menu - Position</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="%description%" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />
    
    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    
    <link href="../../themes/wijmo/jquery.wijmo.wijsuperpanel.css" rel="stylesheet" type="text/css" />
    <link href="../../themes/wijmo/jquery.wijmo.wijmenu.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijutil.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijsuperpanel.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijmenu.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#wijmenu1").wijmenu({
                orientation: 'vertical',
                trigger: "#btn1"
            });

            $("#my1,#my2,#at1,#at2").change(function () {
                $("#wijmenu1").wijmenu("option", "position", { my: $("#my1").get(0).value + " " + $("#my2").get(0).value, at: $("#at1").get(0).value + " " + $("#at2").get(0).value });
            });
        });
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Position</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <button id="btn1">
                click here</button>
            <ul id="wijmenu1">
                <li><a href="#">Breaking News</a></li>
                <li><a href="#">Entertainment</a></li>
                <li><a href="#">Finance</a></li>
                <li><a href="#">Food &#38; Cooking</a></li>
                <li><a href="#">Lifestyle</a>
                    <ul><li><a href="#">submenu</a></li></ul>
                </li>
                <li><a href="#">News</a></li>
                <li><a href="#">Politics</a></li>
                <li><a href="#">Sports</a></li>
            </ul>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <div class="option-row">
                    <label>
                        My</label>
                    <select id="my1">
                        <option value="left">left</option>
                        <option value="center">center</option>
                        <option value="right">right</option>
                    </select>
                    <select id="my2">
                        <option value="top">top</option>
                        <option value="center">center</option>
                        <option value="bottom">bottom</option>
                    </select>
                </div>
                <div class="option-row">
                    <label>
                        At</label>
                    <select id="at1">
                        <option value="left">left</option>
                        <option value="center">center</option>
                        <option value="right">right</option>
                    </select>
                    <select id="at2">
                        <option value="top">top</option>
                        <option value="center">center</option>
                        <option value="bottom" selected="selected">bottom</option>
                    </select>
                </div>
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
This sample demonstrates how the <b>position</b> option can be used to determine where a menu opens relative to a trigger, such as a button that is clicked to open the menu.
        </div>
    </div>
</body>
</html>
